package zy;

public class Tu extends Thread {
	
	public void run(){
		for (int i=10;i<=20;){
			System.out.println("兔子跑了"+i+"米");
			i=i+10;
			if(i<=20){
			try{
				System.out.println("兔子睡了10秒");
				Thread.sleep(1000);}
				catch(InterruptedException e){}  
			}
		else
		{
			System.out.println("兔子到终点了");	
		}
  }			
}
}
